package com.example.blog.service.impl;

import com.example.blog.dao.blogAndTagRepository;
import com.example.blog.service.blogAndTagService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
public class blogAndTagServiceImpl implements blogAndTagService {

    @Autowired
    private blogAndTagRepository blogAndTagRepository;

    @Transactional
    @Override
    public void save(Integer blogId, Integer tagId) {
        blogAndTagRepository.save(blogId,tagId);
    }


    @Transactional
    @Override
    public void delete(Integer blogId) {
        blogAndTagRepository.delete(blogId);
    }
}
